package vn.mahjonggame.util;

import java.util.List;

import vn.mahjonggame.metadata.Player;
import vn.mahjonggame.metadata.ResponseCode;
import vn.mahjonggame.metadata.Tile;

import com.smartfoxserver.v2.entities.Room;
import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.data.ISFSArray;
import com.smartfoxserver.v2.entities.data.SFSObject;

public interface MahjongUtil {
	public SFSObject makeResponse(ResponseCode code, SFSObject data);
	public SFSObject makeResponseMessage(String message);
	public int rollDice();
	public User getUserByPlayerId(int playerId, List<User> users);
	public List<Tile> getDistinctTileByType(int tileType, List<Tile> tiles);
	public List<Tile> getTileByType(int tileType, List<Tile> tiles);
	public List<Integer> getTileIndexsByType(int tileType, List<Tile> tiles);
	public List<Tile> getTilesByIndex(int tileIndex, List<Tile> tiles);
	public void removeTileByType(int tileType, List<Tile> tiles);
	public List<Integer> tileArrayToTileIdArray(List<Tile> tiles);
	public String tileIdsIntToString(List<Tile> tiles);
	public List<List<Integer>> tilesArrayToTileIdsArray(List<List<Tile>> tiles);
	public ISFSArray javaArrayToSFSArray(List<Tile> tiles);
	public ISFSArray javaArraysToSFSArray(List<List<Tile>> tiles);
	public boolean isApiSuccess(SFSObject response);
	public String log(Room room, Player player, String handlerName, String content);
}
